<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>表单</title>
</head>
<body>
  <form action="" method="get">
     <input type="text" name="username" id="user"><br>
     <input type="password" name="password" id="psd">
     <input type="submit" value="提交">
  </form>
  <script>
    for(let i = 0;i < 10;i++){
          console.log(i)
          setTimeout(() => {
             console.log(`i:${i}`);
          }, 1000);
    }
  //使用var的话,能settimeout执行完毕,for循环已经走完了,如果使用let,他会在的代码块之内有效,
  //也就是循环一次,打印一次
  //用map让数字乘以2
    const numbers = [2,3,5,6,10,30];
    const doublenum = numbers.map((item,i) => `${i} : ${item}`)
    console.log(doublenum)
  </script>
</body>
</html>